<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改用户扩展')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-member-edit" th:object="${ppMember}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">昵称：</label>
            <div class="col-sm-8">
                <input name="nickname" th:field="*{nickname}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">性别：</label>
            <div class="col-sm-8">
                <input name="sex" th:field="*{sex}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">图像地址：</label>
            <div class="col-sm-8">
                <img th:src="*{headUrl}" style="width: 25%">
                <!--<input name="headUrl" th:field="*{headUrl}" class="form-control" type="text">-->
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">生日：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="birthday" th:value="${#dates.format(ppMember.birthday, 'yyyy-MM-dd')}"
                           class="form-control" placeholder="yyyy-MM-dd" type="text">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">身高：</label>
            <div class="col-sm-8">
                <input name="stature" th:field="*{stature}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">体重：</label>
            <div class="col-sm-8">
                <input name="weight" th:field="*{weight}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">签名：</label>
            <div class="col-sm-8">
                <input name="signature" th:field="*{signature}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">星座：</label>
            <div class="col-sm-8">
                <input name="constellation" th:field="*{constellation}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">爱好：</label>
            <div class="col-sm-8">
                <input name="hobby" th:field="*{hobby}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">职业：</label>
            <div class="col-sm-8">
                <input name="profession" th:field="*{profession}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">照片：</label>
            <div class="col-sm-8">
                <input name="picture" th:field="*{picture}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">邀请码：</label>
            <div class="col-sm-8">
                <input name="invitationCode" th:field="*{invitationCode}" class="form-control" type="text" readonly
                       unselectable="on">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">情感状态 ：</label>
            <div class="col-sm-8">
                <!--<input type="radio" name="emotionStatus" value="">
                <label th:for="emotionStatus" th:text="未知"></label>-->
                <select name="emotionStatus" class="form-control m-b"
                        th:with="type=${@dict.getType('sys_affective_state')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                            th:value="${dict.dictValue}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">交友目的：</label>
            <div class="col-sm-8">
                <input name="makeFriendsPurpose" th:field="*{makeFriendsPurpose}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">城市：</label>
            <div class="col-sm-8">
                <input name="city" th:field="*{city}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">国家：</label>
            <div class="col-sm-8">
                <input name="country" th:field="*{country}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">居住地：</label>
            <div class="col-sm-8">
                <input name="address" th:field="*{address}" class="form-control" type="text">
            </div>
        </div>
        <!--<div class="form-group">
            <label class="col-sm-3 control-label">经度：</label>
            <div class="col-sm-8">
                <input name="longitude" th:field="*{longitude}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">纬度：</label>
            <div class="col-sm-8">
                <input name="latitude" th:field="*{latitude}" class="form-control" type="text">
            </div>
        </div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">是否是开通过会员：</label>
            <div class="col-sm-8">
                <input name="isvip" th:field="*{isvip}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">vip开通时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="vipOpenTime" th:value="${#dates.format(ppMember.vipOpenTime, 'yyyy-MM-dd')}"
                           class="form-control" placeholder="yyyy-MM-dd" type="text">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">vip失效时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="vipCloseTime" th:value="${#dates.format(ppMember.vipCloseTime, 'yyyy-MM-dd')}"
                           class="form-control" placeholder="yyyy-MM-dd" type="text">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">余额：</label>
            <div class="col-sm-8">
                <input name="balance" th:field="*{balance}" class="form-control" type="text" readonly  unselectable="on">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">收益：</label>
            <div class="col-sm-8">
                <input name="earnings" th:field="*{earnings}" class="form-control" type="text" readonly  unselectable="on">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">财富值：</label>
            <div class="col-sm-8">
                <input name="treasure" th:field="*{treasure}" class="form-control" type="text"readonly  unselectable="on" >
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">财富等级：</label>
            <div class="col-sm-8">
                <input name="treasureLevel" th:field="*{treasureLevel}" class="form-control" type="text" readonly  unselectable="on">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script type="text/javascript">
    var prefix = ctx + "app/member";
    $("#form-member-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-member-edit').serialize());
        }
    }

    $("input[name='birthday']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='vipOpenTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='vipCloseTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
</script>
</body>
</html>